﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<%@ include file="/include/include.jsp" %>
<head>

	<script>

		function selectAddProduct(){
			//if (!isSelected('idss')){
			//	alert("您必须选择一行!");
			//	return;
			//}
			//$('ids').value = getValuesByTagName('idss');
			//$('form4').action = "${ctx}/warehouse/addproduct/list/search";
			//alert($('form4').action);
			//$('form4').submit();
			window.location ="${ctx}/warehouse/addproduct/list/search";
		}
	
	function validatorForm(){
	
		var result = Validator.Validate($('form1'),3)
		
		if(result){
				//$('orders').value;
				var str = '';
				var ops =$('orders').options;
				for (i=0;i<ops.length;i++)
				{
				  	str += ops.options[i].text+'\r\n';
				}
				return confirm('<font color=red>您是否确认对 单号为：\r\n\r\n'+str+'\r\n 的订单进行补货吗？</font>');
				//alert(str);
				//return false;
		}
		
			
		return false;
	}
</script>
</head>

<body>
	
	<%@ include file="/include/header.jsp" %>

	<%@ include file="/include/menu.jsp" %>
			
	<div id="mainContent">
			<div align="center">
				<form action="${ctx}/warehouse/addproduct/selectaddproduct/do" id='form1' method="post" onsubmit="return validatorForm();">
					<input name='ids'  type="hidden" value="${ids}"/>
					<table cellspacing="0" cellpadding="0" class="form-grid" style="text-align:center">
				<tbody>
					<tr>
						<td style="text-align: right; padding-right: 3px; width: 20%;">DO单号：</td>
						<td style="text-align: left; padding-right: 3px; width: 20%;">
						        <select id="orders" multiple="multiple" style="color:red;width: 150px;height: 170px;">
						        		<c:forEach var="inv" items="${inventoryRecords}">
						        			<option>${ inv.purchaseOrder.orderNumber}</option>
						        		</c:forEach>
									</select>
						</td>
					</tr>	
					<tr>
						<td style="text-align: right; padding-right: 3px; width: 20%;">SO单号:</td>
						<td  style="text-align: left; padding-right: 3px; width: 20%;">
						<input type=""  id='soNumber' name='soNumber' size="20"  dataType="Require" msg="SO号码不能为空!"/>
						</td>
					</tr>
					<tr align="center">
						<td colspan="2">
							<input type="button" value="返回" onclick="window.location='${ctx}/warehouse/addproduct/list';">
							<input type="submit" value="确定" >
						</td>
					</tr>
				</tbody>
			</table>
				</form>
			</div>
	</div>
	
	<%@ include file="/include/script.jsp" %>
	
</body>

</html> 